test(e2e): cover nanobind_extension against the PBS py_cc toolchain#1299
Merged
Conversation
jbedard
force-pushed
the
nanobind-py-cc-e2e
branch
from
July 18, 2026 20:32
604a24e to
bfb5172
Compare
jbedard
approved these changes
Jul 18, 2026
Adds an e2e case that builds a real nanobind_extension in a graph whose only Python toolchains come from python_interpreters, exercising the @rules_python//python/cc:current_py_cc_headers path that nanobind and pybind11 use to resolve Python headers. Complements pbs-cc-toolchain (bare cc_binary + current_py_cc_headers/libs) with the common nanobind consumer, guarding the py_cc toolchain registration behind issue aspect-build#1095. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jbedard
force-pushed
the
nanobind-py-cc-e2e
branch
from
July 18, 2026 20:35
bfb5172 to
6e610bb
Compare
jbedard
enabled auto-merge (squash)
July 18, 2026 20:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an e2e case that builds a real
nanobind_extensionin a graph whose only Python toolchains come frompython_interpreters(the rules_pythonpython.toolchain()drop-in), exercising the@rules_python//python/cc:current_py_cc_headerspath that nanobind and pybind11 use to resolve Python headers.pbs-cc-toolchainalready covers the barecc_binary+current_py_cc_headers/current_py_cc_libspath; this adds the nanobind consumer, which is how most real-world native extensions reachcurrent_py_cc_headers. It guards the py_cc toolchain registration (issue #1095) against regression.Two targets:
example_ext_build_test— abuild_testover thenanobind_extension; fails at analysis ifpython_interpretersdoes not register@rules_python//python/cc:toolchain_type.example_ext_test— compiles, links, loads and calls the extension under a PBS runtime (py 3.13).End-user visible: no (test-only). Breaking: no.
Test plan:
bazel test //nanobind-py-cc/...ine2e/casespasses locally (build_test + runtime import/call; Linux x86_64, llvm toolchain).Context: came out of testing the py_cc gap for a real nanobind consumer (discussed in #1131); @jbedard suggested opening this.